import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        Scanner sc  = new Scanner(System.in);
        System.out.println("请输入一个数字：");
        int x = sc.nextInt();
        boolean flag = true;
        int temp = x;
        for (int i = 2; i <= x - 1; i++) {
            if (x % i == 0) {
                flag = false;
                break;
            }
        }
        if(flag){
            System.out.println(x+"是一个质数");
        }else {
            System.out.println(x+"是不一个质数");
        }
    }
}
